create or replace function selectDistributor(
	out refcursor, inout xml
	)
as
$$
	declare
		ref alias for $1;
		xmlQueryData alias for $2;
	begin
		open ref for
			select Distributor2xml(dior.idDistributor, dior.nameDistributor)
				from Distributor dior;
		return;
	end;
$$ language plpgsql	stable;